From: Keir Fraser Date: Fri, 24 Dec 2010 08:37:34 +0000 (+0000) Subject: x86 xsave: Fix 64bit xsave_feature support for set_xcr0(). X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11022 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=40aca4eccbd7158b99e3270b662c0b8c0b2e7ee3;p=xen.git x86 xsave: Fix 64bit xsave_feature support for set_xcr0(). Signed-off-by: Wei Huang --- diff --git a/xen/arch/x86/i387.c b/xen/arch/x86/i387.c index 1ddb2c7495..5f3f041613 100644 --- a/xen/arch/x86/i387.c +++ b/xen/arch/x86/i387.c @@ -187,7 +187,7 @@ void xsave_init(void) * Set CR4_OSXSAVE and run "cpuid" to get xsave_cntxt_size. */ set_in_cr4(X86_CR4_OSXSAVE); - set_xcr0(eax & XCNTXT_MASK); + set_xcr0((((u64)edx << 32) | eax) & XCNTXT_MASK); cpuid_count(XSTATE_CPUID, 0, &eax, &ebx, &ecx, &edx); if ( cpu == 0 )